Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lodash.forown

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lodash.forown

The lodash method `_.forOwn` exported as a module.

  • 4.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
61K
decreased by-81.19%
Maintainers
3
Weekly downloads
 
Created

What is lodash.forown?

The lodash.forown package is a utility function from the Lodash library that iterates over own enumerable string keyed properties of an object and invokes a function for each property. This is useful for object manipulation and iteration tasks.

What are lodash.forown's main functionalities?

Iterate over object properties

This feature allows you to iterate over the own enumerable string keyed properties of an object. The provided function is invoked for each property, receiving the value and key as arguments.

const _ = require('lodash.forown');
const object = { 'a': 1, 'b': 2, 'c': 3 };
_.forOwn(object, function(value, key) {
  console.log(key, value);
});

Early exit from iteration

This feature allows you to exit the iteration early by returning `false` from the iteratee function. This can be useful when you need to stop processing once a certain condition is met.

const _ = require('lodash.forown');
const object = { 'a': 1, 'b': 2, 'c': 3 };
_.forOwn(object, function(value, key) {
  if (key === 'b') {
    return false;
  }
  console.log(key, value);
});

Other packages similar to lodash.forown

Keywords

FAQs

Package last updated on 13 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc